package com.meituan.sdk.model.ddzhkh.merchantreceipt.merchantreceiptSendCallback;

import com.meituan.sdk.annotations.ApiMeta;
import java.util.List;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 商家券发券异步回调
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzhkh/merchantreceipt/send/callback",
    businessId = 59,
    apiVersion = "10012",
    apiName = "merchantreceipt_send_callback",
    needAuth = true
)
public class MerchantreceiptSendCallbackRequest implements MeituanRequest<MerchantreceiptSendCallbackResponse> {
    /**
    * <p data-diff-id="ct-diff-id-8df3c929-eb06-4133-b97c-fa1101270b30">美团订单ID</p>
    */
    @NotNull(message = "orderId不能为空")
    @SerializedName("orderId")
    private Long orderId;
    /**
    * <p data-diff-id="ct-diff-id-9fef66b0-dda6-48bd-9212-e7e0a8166682">发券结果，1-成功，2-失败</p>
    */
    @NotNull(message = "sendResult不能为空")
    @SerializedName("sendResult")
    private Integer sendResult;
    /**
    * <p data-diff-id="ct-diff-id-2469e1d9-d4d3-49f5-beef-519992ea818a">发券结果描述(发券结果失败时必填)</p>
    */
    @SerializedName("sendResultDesc")
    private String sendResultDesc;
    /**
    * <p data-diff-id="ct-diff-id-a560e4ec-a9bd-478d-b944-3abade2ce120">券码类型(1为一码一验，2为一码多验)</p>
    */
    @NotNull(message = "receiptType不能为空")
    @SerializedName("receiptType")
    private Integer receiptType;
    /**
    * <p data-diff-id="ct-diff-id-477c8470-9e99-45b1-ab84-c25b3051ff13">券码信息列表(发券成功时必填)</p>
    */
    @SerializedName("receiptInfoList")
    private List<ReceiptInfoResult> receiptInfoList;

    public Long getOrderId() {
        return orderId;
    }
    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }
    public Integer getSendResult() {
        return sendResult;
    }
    public void setSendResult(Integer sendResult) {
        this.sendResult = sendResult;
    }
    public String getSendResultDesc() {
        return sendResultDesc;
    }
    public void setSendResultDesc(String sendResultDesc) {
        this.sendResultDesc = sendResultDesc;
    }
    public Integer getReceiptType() {
        return receiptType;
    }
    public void setReceiptType(Integer receiptType) {
        this.receiptType = receiptType;
    }
    public List<ReceiptInfoResult> getReceiptInfoList() {
        return receiptInfoList;
    }
    public void setReceiptInfoList(List<ReceiptInfoResult> receiptInfoList) {
        this.receiptInfoList = receiptInfoList;
    }


    @Override
    public MeituanResponse<MerchantreceiptSendCallbackResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<MerchantreceiptSendCallbackResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "MerchantreceiptSendCallbackRequest{" + "orderId=" + orderId + "," + "sendResult=" + sendResult + "," + "sendResultDesc=" + sendResultDesc + "," + "receiptType=" + receiptType + "," + "receiptInfoList=" + receiptInfoList + "}";
    }
}
